﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CruiseCategory : System.Web.UI.Page
{
    private int nCountry = 0;
    private int nRegion = 0;
    private int nType = 0;
    private int nPageSize = 0;
    private int nCurrentLang = Support.GetCurrentLanguage();
    

    protected void Page_Load(object sender, EventArgs e)
    {
        getPara();
        getData();
    }
    private void getPara()
    {
        nCountry = ConvertData.ConvertToInt(Request.QueryString[Config.COUNTRY]);
        nRegion = ConvertData.ConvertToInt(Request.QueryString[Config.CRUISEREGION]);
        nType = ConvertData.ConvertToInt(Request.QueryString[Config.CRUISETYPE]);

        nPageSize = 10;
    }

    private void getData()
    {
        if (nCountry != 1)
            nRegion = 0;
        if (nCountry == 0 || nCountry > 3)
        {
            nCountry = 1;
            nRegion = 1;
            nType = 2;
        }
        ctrCruiseCatDetail1.setCruiseRegion(nCountry, nRegion, nType, nPageSize);
    }

}